<?php
include('includes/connect.php');
session_start();

if($_SESSION['user_id'] == 0)
{
	header("location:register_login.php");
}
else
{


$experts_id=explode("#?",$_POST['test']);

		$sql= mysql_query("select * from experts where experts_id=".$experts_id[1]);

		$qury = mysql_fetch_array($sql);

		$countries = mysql_query("select * from experts as e, countries as con where con.country_id = e.country_id and e.experts_id=".$experts_id[1]);

		$getcountries = mysql_fetch_array($countries);

		$expertType = mysql_query("select * from experts as etype, expert_cat as eCat where eCat.expert_cat_id = etype.expert_cat_id and etype.experts_id=".$experts_id[1]);

		$getExpertType = mysql_fetch_array($expertType);

		$expertCat = mysql_query("select * from experts as eCat, expert_category as cat where cat.expert_category_id = eCat.expert_category_id and eCat.experts_id=".$experts_id[1]);

		$getExpertCat = mysql_fetch_array($expertCat);

		$subCat = mysql_query("select * from experts as eSubCat, expert_subcategory as esubcategories where esubcategories.expert_subcategory_id = eSubCat.expert_subcategory_id and eSubCat.experts_id=".$experts_id[1]);
		
		$getSubCat = mysql_fetch_array($subCat);

	

?>
<style>
	.heading{
		font-weight: 200;
	}

</style>
	<div id="profile">

		<div style="float:left; margin: 10px;">
                            <!-- <table border="1" width="100%" cellspacing="0" cellpadding="9">						
                                
								<tr><td colspan="4" style="height:15px;"></td></tr>

								<tr>
                                    <td width="200" class="heading">Company Info:</td>
                                    <td><span style="width: 200px;"><?php echo $qury['company_info']; ?></span></td>
                                </tr>
                                
                            </table> -->
			<table border="1" width="100%" cellspacing="0" cellpadding="9">						
                                
								<tr><td colspan="4" style="height:15px;"></td></tr>

								<tr>
                                    <td width="170" class="heading">Company Name:</td>
                                    <td width="200"><?php echo $qury['company_name'];?></td>
									<td width="250" class="heading">Website Name (If any):</td>
                                    <td width="250"><?php echo $qury['website_name'];?></td>
                                </tr>
								
								<tr>
                                    <td class="heading">Company Address:</td>
                                    <td><?php echo $qury['company_address'];?></td>
									<td class="heading">Product Dealing:</td>
									<td><?php echo $qury['product_dealing'];?></td>
                                    
                                </tr>
								<tr>
                                    <td class="heading">Person In Charge/Owner:</td>
                                    <td><?php echo $qury['person_in_charge_owner'];?></td>
									<td class="heading">Country:</td>
									<td><?php echo $getcountries['name'];?></td>
                                </tr>		
                                <tr>
                                    <td class="heading">Phone:</td>
									<td><?php echo $qury['experts_phone'];?></td>
									<td class="heading" valign="top">Are you willing to take Assignments:</td>
                                    <td>
										<?php
											$supply = mysql_query("select * from location where user_type = 'Expert' and user_id=".$experts_id[1]);

											while($getsupply = mysql_fetch_array($supply))
											{
												echo $getsupply['location'].'<br />';
											}
										?>
									</td>
                                </tr>				
                                
                                <tr>
                                    <td class="heading"> Mobile:</td>
                                    <td><?php echo $qury['experts_mob'];?></td>
									<td class="heading">Companies/Clients Served (If u wish to disclosure):</td>
                                    <td><?php echo $qury['companies_clients_served'];?></td>
                                </tr>	
								
								<tr>
                                    <td class="heading">Residence No:</td>
                                    <td><?php echo $qury['expert_res_no'];?></td>
									<td class="heading">Your Company&#39;s USP (Unique Selling Point):</td>
                                    <td><?php echo $qury['companys_USP'];?></td>
                                </tr>                                  

                                      
                                <tr>
                                    <td class="heading">User Name:</td>
                                    <td><?php echo $qury['experts_username'];?></td>
									<td class="heading">Company/Owners Experience (Years):</td>
								    <td><?php echo $qury['company_owners_experience'];?></td>
                                </tr>                                                                                               
								<tr>
									<td class="heading">Expert Type:</td>
                                    <td><?php echo $getExpertType['expert_cat'];?></td>
									<td class="heading">Awards & accolade:</td>
								    <td><?php echo $qury['awards_accolade'];?></td>
								</tr> 

								<tr>
									<td class="heading">Expert Category:</td>
									<td><?php echo $getExpertCat['expert_category'];?></td>
                                    <td class="heading">Company Information:</td>
									<td><?php echo $qury['company_info'];?></td>

								</tr>
				
								<tr>
									<td class="heading">Expert Sub-Category:</td>
                                    <td><?php echo $getSubCat['expert_subcategory'];?></td> 
								</tr>
                          					
                                
                            </table>

		</div>

	</div>
<?php
}	
?>